import Vuex from 'vuex'
import Vue from 'vue'
import MovieModule from '@/store/movies/module.js'
import createLogger from '@/plugins/logger.js'

Vue.use(Vuex)

const debug = process.env.NODE_ENV !== 'production'

export default new Vuex.Store({
  // 这里是 moudules 不是 moudule 找了半天才找到问题所在
  modules: {
    MovieModule
  },
  strict: debug,
  plugins: debug ? [createLogger()] : []
})
